<?php
class Home extends Controller {
	
	function Home()
	{
		parent::Controller();
		$this->lang->load('freakauth');
		$this->_container = $this->config->item('CNC_template_dir').'template/container';
		$this->load->library('CNC_frontend', 'cnc_frontend');
	}
	
	function index()
	{	
		 if(belongsToGroup('user'))
  		 {
  		 	redirect('myaccount','location');
  		 }
  		 else 
  		 {
		$data['heading'] = 'Welcome Guest';
		$data['sidebar'] = $this->cnc_frontend->get_active_sidebar();
		$data['fal'] = $this->cnc_frontend->content_page('Home');
		$data['page'] = $this->config->item('CNC_break_view');
        $this->load->vars($data);
		$this->load->view($this->_container);
  		 }
		//$this->output->enable_profiler(TRUE);
	}
	function terms()
	{
		
		
		//$data['terms'] =
		//$data['terms'] =
		//$this->load->vars($data);
		//echo $this->config->item('CNC_template_dir').'/template/terms';
		$this->load->view($this->config->item('CNC_template_dir').'/template/terms');
		
	}
}
?>
